{% extends "site.html" %}
{% block title %}{% endblock %}
{% block stylesheet %}{% load media %}{% media_prefix %}css/sklad.css{% endblock %}
{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% media_prefix %}css/sklad-tree.css">{% endblock %}
{% block globalconteiner %}
<div id="title">
    <h1>Склад</h1>
</div>
<div id="search">
    <form action="." method="POST">
        <input name="search_query" type="text" size="60">
        <input class="default" type="submit" name="_save" value="Найти"/> 
    </form>
</div>
<div id="main_menu">
    <A href="{% url index %}">Запчасти</A> 
    <A href="{% url document_all %}">Документы</A> 
</div>
{% block main %}

<table border="0" class="table_layout" style="margin-bottom:30px;">
    <tr>
        <td>
            <div id="contentleft">

            {% if currentcategory %}
                <p class="item_menu">
                    <a href="{% url category_create currentcategory %}">Новая подкатегория</a>
                </p>
            {% else %}
                <p class="item_menu">
                    <a href="{% url category_root_create %}">Новая категория</a>
                </p>
            {% endif %}
            
            <div id="catlist">
            {% for item in cattree %}
              <div class="catitem">

                <samp style="padding-left: {{ item.csslevel }}px">
                {% if item.expanded %}	
                    {% if item.child_present %}
                        <a href="{% url category_view item.id %}?collaps=1">
                        <img src="{% media_prefix %}img/minus.gif" width="9" height="9"></a>
                    {% else %}
                        <img src="{% media_prefix %}img/rect.gif" width="9" height="9">
                    {% endif %}		
                {% else %}
                    {% if item.child_present %}
                        <a href="{% url category_view item.id %}?expand=1">
                        <img src="{% media_prefix %}img/plus.gif" width="9" height="9"></a>
                    {% else %}
                        <img src="{% media_prefix %}img/rect.gif" width="9" height="9">
                    {% endif %}		
                {% endif %}
                {% ifequal item.id currentcategory %}<b>{% endifequal %}
                   <a href="{% url category_view item.id %}">{{ item.name }}</a>
                {% ifequal item.id currentcategory %}</b>{% endifequal %}</samp>
              </div>
            {% endfor %}
            </div>
       
            </div>
        </td>
        <td width="99%">
            <div id="contentright">
  
                {% if messages %}
                    <ul id="messages">
                    {% for message in messages %}
                        <li>{{ message|safe }}</li>
                    {% endfor %}
                    </ul>
                {% endif %}
                {% block path_menu %}
                <div id="path-menu">
                    <A href="{% url index %}">Начало</A>
                    {% for cp in category_path %}
                        / <A href="{% url category_view cp.id %}">{{ cp.name }}</A>
                    {% endfor %} 
                </div>
                {% endblock %}
                {% block contenttitle %}
                {% endblock %} 
    
                {% block content %}
                    <h5>content</h5>
                {% endblock %}
            </div>
        </td>
    </tr>
</table>
{% endblock %}

{% endblock %}

{% block meta %}
{% if debug %}
<p>
    {{ sql_queries|length }} Quer{{ sql_queries|pluralize:"y,ies" }}
    {% ifnotequal sql_queries|length 0 %}
        (<span style="cursor: pointer;" onclick="var s=document.getElementById('debugQueryTable').style;s.display=s.display=='none'?'':'none';this.innerHTML=this.innerHTML=='Show'?'Hide':'Show';">Show</span>)
    {% endifnotequal %}
</p>
<table id="debugQueryTable" style="display: none;text-align:left;">
    <col width="1"></col>
    <col></col>
    <col width="1"></col>
    <thead>
        <tr>
            <th scope="col">#</th>
            <th scope="col">SQL</th>
            <th scope="col">Time</th>
        </tr>
    </thead>
    <tbody>
    {% for query in sql_queries %}
        <tr class="{% cycle odd,even %}">
            <td>{{ forloop.counter }}</td>
            <td>{{ query.sql|escape }}</td>
            <td>{{ query.time }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
{% endif %}
Версия:&nbsp;{{ version_string }}&nbsp;&nbsp;&nbsp;&nbsp;Дата:&nbsp;10.08.2009

{% endblock %}	

